package apiday01;

/*
    截取当前字符串中制定范围内的字符串(含头不含尾)
    String substring[int start,int end)
 */
public class SubstringDemo {
    public static void main(String[] args) {

        String str = "www.tedu.cn";
        String name = str.substring(4, 8);
        System.out.println(name);//tedu

        name = str.substring(4);//从下标4开始一直到末尾
        System.out.println(name);
    }
}
